<?php

namespace App\Services\Fund;

use App\Services\ProjectValidate;

/**
 *
 * Class ValidateCurrencyAccount
 * @package App\Services\Fund
 */
class ValidateCurrencyAccount extends ProjectValidate
{

    /**
     * 自定义子类初始化
     * @param array $initData
     * @return mixed
     */
    public function initValidate($initData = [])
    {
        // TODO: Implement initValidate() method.
    }


    /**
     * @var array 用户模块的验证集合
     */
    public $rules = [
        'user_id'        => 'integer|min:1',
        'currency'        => 'integer|min:1', //['float', 'egt' => '0.0001'],
        'create_ip'        => 'ip',
        'update_ip'        => 'ip',
        'app_id'        => 'integer|min:1',
        'opposite_id'        => 'integer|min:1|different:user_id',
        'exchange'        => 'in:Integral,Fund',
         'money'        => 'float|min:0',
         'currency_scale'        => 'float|min:0',
         'user_info'        => 'regex:/^{.*}$',
         'opposite_info'        => 'regex:/^{.*}$',
         'other_info'        => 'regex:/^{.*}$',
         'type'        => 'in:goods,certificate,order,system',
         'obj_id'        => 'integer|min:1',
         'freeze_counts'        => 'integer|min:1',
         'integral'        => 'numeric|min:0',
         'reason'        => 'min:5',
         'freeze_status'        => 'in:0,1',
    ];

   

    public $messages = [
       
    ];

    /**
     * @var array 上面规则中定义的 key 的名字
     */
    public $attributes = [
      
    ];

   
}